<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBamboosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bamboos', function (Blueprint $table) {
            $table->increments('id');
            $table->string('radical', 32)->comment('部首');
            $table->string('sound', 32)->comment('声');
            $table->string('rhyme', 32)->comment('韵');
            $table->string('initial', 32)->comment('字头');
            $table->string('word', 32)->comment('释字');
            $table->string('notes', 255)->comment('注释');
            $table->string('word_img', 255)->comment('简字图');
            $table->string('bamboo_img', 255)->comment('竹简图');
            $table->string('grapheme_img', 255)->comment('字形图');
            $table->string('source', 255)->comment('出处');
            $table->string('half_title', 255)->comment('篇章名');
            $table->text('description')->comment('描述');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bamboos');
    }
}
